package cn.cuiliangpeng.org.domain;

import cn.cuiliangpeng.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门实体类
 */
@Data
public class Department extends BaseDomain {
    private String sn;//部门编号
    private String name;//部门名称
    private String dirPath;//上级分类id
    private Integer state;//状态 1启用,0禁用
    private Long manager_id;//部门id
    private Long parent_id;//上级部门id

    private Department parent;//上级部门  做关联查询使用
    private Employee manager;//员工对象  做关联查询使用
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//最后一条没数据不显示
    private List<Department> children=new ArrayList<>();//无线级树
}
